import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router/index'
import { store, key } from './store'
import elementPlus from './plugins/element-plus'
import directives from './plugins/directives'
import * as ElIcon from '@element-plus/icons-vue'

// 统一样式
import './styles/index.scss'
import './styles/default.scss'
// 公共组件
import CustomComponents from './components'

const app = createApp(App)
// 配置element plus 图标组件
for (const iconName in ElIcon) {
  app.component(iconName, ElIcon[iconName])
}
app.use(router)
  .use(store, key)
  .use(elementPlus)
  .use(directives)
  .use(CustomComponents)
  .mount('#app')
